package com.cn.jiyun;
import com.cn.jiyun.entity.pojo.Food;
import com.cn.jiyun.entity.pojo.Hotel;
import com.cn.jiyun.entity.pojo.Meals;
import com.cn.jiyun.entity.pojo.Vouchers;
import com.jiyun.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "food-service")
public interface FoodFeignClient {
    @PostMapping("/food/findAllFood")
    public Result<List<Food>> findAllFood();
    @PostMapping("/food/findFoodOrderByRating")
    Result<List<Food>> findFoodOrderByRating(Integer rating);
    @GetMapping("/food/findById/{foodId}")
     Result<Food> findById(@PathVariable("foodId") Integer foodId);

    @PostMapping("/food/findVouchers")
     Result<List<Vouchers>> findVouchers(Vouchers vouchers);

    @PostMapping("/food/findMeals")
    Result<List<Meals>> findMeals(Meals meals);

    @GetMapping("/food/findMealById")
    Result<Meals> findMealById(@RequestParam("packageId") Integer packageId);

}
